package com.example.config;

import com.example.tranport.client.ClientFactory;
import com.example.tranport.client.template.JmsTemplate;
import com.example.tranport.client.template.JmsTemplateImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MQConfig {

    @Bean
    public JmsTemplate jmsTemplate(){
        return new JmsTemplateImpl();
    }

    @Bean
    public ClientFactory clientFactory() {
        ClientFactory clientFactory = new ClientFactory();
        clientFactory.setHost("127.0.0.1");
        clientFactory.setPort(8888);
        return clientFactory;
    }
}
